from selenium import webdriver

path = 'chromedriver.exe'

browser = webdriver.Chrome(path)

url = 'http://www.baidu.com'

browser.get(url)

# 获取标签的属性
button = browser.find_element_by_id('su')
print(button.get_attribute('value'))
print(button.text)
print(button.tag_name)
print(button.id)


browser.quit()
